<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>PostProcessing - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">PostProcessing</h1>
		<section>
			<header>
				<div class="class-description"><p>This module is responsible to manage the post processing setups in apps.
You usually create a single instance of this class and use it to define
the output of your post processing effect chain.</p>
<p>Note: This module can only be used with <code>WebGPURenderer</code>.</p></div>
				<h2>Code Example</h2>
				<div translate="no"><pre><code class="language-js">const postProcessing = new PostProcessing( renderer );
const scenePass = pass( scene, camera );
postProcessing.outputNode = scenePass;
</code></pre></div>
			</header>
			<article>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="PostProcessing" translate="no">new <a href="#PostProcessing">PostProcessing</a><span class="signature">( renderer : <span class="param-type"><a href="Renderer.html">Renderer</a></span>, outputNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new post processing management module.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>renderer</strong>
									</td>
									<td class="description last">
										<p>A reference to the renderer.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>outputNode</strong>
									</td>
									<td class="description last">
										<p>An optional output node.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="context" translate="no">.<a href="#context">context</a><span class="type-signature"> : Object</span> <span class="type-signature">(readonly) </span></h3>
					<div class="description">
						<p>Returns the current context of the post processing stack.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="needsUpdate" translate="no">.<a href="#needsUpdate">needsUpdate</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
					<div class="description">
						<p>Must be set to <code>true</code> when the output node changes.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="outputColorTransform" translate="no">.<a href="#outputColorTransform">outputColorTransform</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>Whether the default output tone mapping and color
space transformation should be enabled or not.</p>
<p>It is enabled by default by it must be disabled when
effects must be executed after tone mapping and color
space conversion. A typical example is FXAA which
requires sRGB input.</p>
<p>When set to <code>false</code>, the app must control the output
transformation with <code>RenderOutputNode</code>.</p>
<pre><code class="language-js">const outputPass = renderOutput( scenePass );
</code></pre>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="outputNode" translate="no">.<a href="#outputNode">outputNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
					<div class="description">
						<p>A node which defines the final output of the post
processing. This is usually the last node in a chain
of effect nodes.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="renderer" translate="no">.<a href="#renderer">renderer</a><span class="type-signature"> : <a href="Renderer.html">Renderer</a></span> </h3>
					<div class="description">
						<p>A reference to the renderer.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Frees internal resources.</p>
						</div>
					</div>
					<h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>When <code>PostProcessing</code> is used to apply post processing effects,
the application must use this version of <code>render()</code> inside
its animation loop (not the one from the renderer).</p>
						</div>
					</div>
					<h3 class="name name-method" id="renderAsync" translate="no">.<a href="#renderAsync">renderAsync</a><span class="signature">()</span><span class="type-signature"> : Promise</span> <span class="type-signature">(async) </span></h3>
					<div class="method">
						<div class="description">
							<p>When <code>PostProcessing</code> is used to apply post processing effects,
the application must use this version of <code>renderAsync()</code> inside
its animation loop (not the one from the renderer).</p>
						</div>
						<dl class="details">
							<dt class="important tag-deprecated"><strong>Deprecated:</strong> Yes</dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> A Promise that resolves when the render has been finished.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/PostProcessing.js" translate="no" target="_blank" rel="noopener">src/renderers/common/PostProcessing.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>